package com.enseirb.bdxmap.converter;

import java.util.List;

import com.enseirb.bdxmap.dao.WifiMarkerDAO;
import com.enseirb.bdxmap.dao.dto.WifiMarkerDTO;
import com.enseirb.bdxmap.exception.BdxMapException;
import com.enseirb.bdxmap.service.model.WifiMarkerBO;

public class WifiMarkerConverter extends AbstractMarkerConverter<WifiMarkerDTO, WifiMarkerBO> {
	
	private WifiMarkerDAO wifiDAO = new WifiMarkerDAO();
	
	@Override
	protected List<WifiMarkerDTO> getDataFromDAO() throws BdxMapException {
		return wifiDAO.getData();
	}
	
	@Override
	protected WifiMarkerBO newMarkerBO() {
		return new WifiMarkerBO();
	}
	
	@Override
	protected WifiMarkerBO setCustomFieldsBO(WifiMarkerDTO wifiDTO, WifiMarkerBO wifiBO) {
		wifiBO.area = wifiDTO.area;
		wifiBO.key = wifiDTO.key;
		return wifiBO;
	}
}
